import request from '@/utils/bsinRequest';
import { getThemeNftListParamsType } from './data.d';

// 获取空投记录列表
export const getDeliverRecordList = (params: any) => {
  return request('/getPageList', {
    serviceName: 'AdminAirdropSerialService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
    },
  });
};

// 新增单个空投
export const addDeliver = (params: any) => {
  return request('/add', {
    serviceName: 'AdminAirdropSerialService',
    methodName: 'add',
    bizParams: {
      ...params,
    },
  });
};

// 查询空投流水详情
export const getDeliverRecordInfo = (params: { serialNo: string }) => {
  return request('/getAirdropSerial', {
    serviceName: 'AdminAirdropSerialService',
    methodName: 'getAirdropSerial',
    bizParams: {
      ...params,
    },
  });
};

// 查询主题nft碎片详情
export const getFragmentsByThemeNo = (params: getThemeNftListParamsType) => {
  return request('/getThemeByThemeNo', {
    serviceName: 'AdminNftThemeService',
    methodName: 'getFragmentsByThemeNo',
    bizParams: {
      ...params,
    },
  });
};

// 获取nft列表
export const getThemeNftList = (params: {
  current: number;
  pageSize: number;
}) => {
  return request('/getPageList', {
    serviceName: 'AdminNftThemeService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
    },
  });
};

//查询客户信息
export const getCustomerList = (params: any) => {
  return request('/getPageList', {
    serviceName: 'AdminCustomerService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
      current: 1,
      pageSize: 50,
    },
  });
};

// 获取当前用户账户
export const getAccountCategory = (params: { customerNo: string }) => {
  return request('/getAccountCategoryByCustomerNo', {
    serviceName: 'AdminAccountService',
    methodName: 'getAccountCategoryByCustomerNo',
    bizParams: {
      ...params,
    },
  });
};
